import net from "net";
const server = net.createServer((socket) => {
  setInterval(() => {
    socket.write("hello", "utf-8");
  }, 1000);
  socket.on("data", (data) => {
    console.log(data.toString());
  });
});
server.listen(8081, () => {
  console.log("server listening on port 8081");
});
